package Tools;

import java.util.ArrayList;

/**
 * @author Joker
 * @create 2022-08-28 0:37
 */
public class ArrayListToArray {
    public static String[][] ArrayListToString(ArrayList<String[]> strings){

        String[][] str=new String[strings.size()][5];
        for (int i = 0; i < strings.size(); i++) {
            str[i]=strings.get(i);
        }
        return str;
    }
    public static String[][] ArrayListToStringStus(ArrayList<String[]> strings){

        String[][] str=new String[strings.size()][6];
        for (int i = 0; i < strings.size(); i++) {
            str[i][0]=strings.get(i)[5];
            str[i][1]=strings.get(i)[0];
            str[i][2]=strings.get(i)[1];
            str[i][3]=strings.get(i)[2];
            str[i][4]=strings.get(i)[3];
            str[i][5]=strings.get(i)[4];
        }
        return str;
    }
    public static ArrayList<String> StringArrayToString(ArrayList<String[]> strings){
        ArrayList<String> str = new ArrayList<>();
        for (int i = 0; i < strings.size(); i++) {
            for (int j = 0; j < 5; j++) {
                str.add(strings.get(i)[j]);
            }
        }
        return str;
    }
    public static ArrayList<String> stringArrayToString(ArrayList<String[]> strings){
        ArrayList<String> str = new ArrayList<>();
        for (int i = 0; i < strings.size(); i++) {
            for (int j = 0; j < 4; j++) {
                str.add(strings.get(i)[j]);
            }
        }
        return str;
    }
}
